package com.fos.BluetoothStory;

import android.app.Application;
import android.content.Intent;
import android.support.v4.content.LocalBroadcastManager;

import com.fos.BluetoothStory.service.BluetoothChatService;
import com.fos.BluetoothStory.service.PlaySongService;

public class GlobalApplication extends Application {
	
	public static LocalBroadcastManager lbm;
	public static GlobalApplication application;

	@Override
	public void onCreate() {
		super.onCreate();
		
		//蓝牙服务
		Intent bcs = new Intent(this, BluetoothChatService.class);
		startService(bcs);
		
		//绑定音乐服务
		Intent service = new Intent(this, PlaySongService.class);
		startService(service);
		
		lbm = LocalBroadcastManager.getInstance(this);
		application = this;
	}
	
}
